//
//  NSString+FGSize.h
//  FGSDK
//
//  Created by LWF on 2018/5/4.
//  Copyright © 2018年 杭州东九网络科技有限公司. All rights reserved.
//

#import <Foundation/Foundation.h>
#import <UIKit/UIKit.h>

@interface NSString (FGSize)
    
    /**  计算只显示一行时的width  */
- (CGFloat)widthWithFont:(UIFont *)font;
    
    /**
     计算显示多行时的height
     attrString 计算高度和这个结果一样
     
     [attrString boundingRectWithSize:(CGSize)size options:(NSStringDrawingOptions)options context:(nullable NSStringDrawingContext *)context].size.height == [attrString.string heightWithFont:(UIFont *)font maxWidth:(CGFloat)maxWidth]
     */
- (CGFloat)heightWithFont:(UIFont *)font maxWidth:(CGFloat)maxWidth;
- (CGSize)sizeWithFont:(UIFont *)font maxWidth:(CGFloat)maxWidth;

@end
